package at.socialconference.backend.connection;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class SocketConnection {

	private static final int PORT = 1981;

	public static void main(String args[]) {
		try {
			ServerSocket server = new ServerSocket(PORT);
			System.out.println("Connector running");
			while (true) {
				Socket socket = server.accept();
				System.out.println("Got connection from: " + socket.getInetAddress());
				Thread stuffer = new RequestExecutor(socket);
				stuffer.start();
			}
		} catch (IOException ex) {
			System.err.println(ex);
		}
	}

}
